/* GLVertexData.h
 *
 * --
 * Copyright (c) 2012, Christophe Huriaux
 * Distributed under the terms of the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * --
 */

#include <initializer_list>
#include <utils/glvector.h>

#ifndef GLVERTEXDATA_H_
#define GLVERTEXDATA_H_

template <typename Tvect>
class GLVertexData
{
protected:
	int nVertices;
	int nComponent;

public:
	GLVertexData(int nVertices, int nComponent)
		: nVertices(nVertices), nComponent(nComponent)
	{}
	GLVertexData()
		: nVertices(0), nComponent(0)
	{}
	virtual ~GLVertexData() {}

	virtual void setGeometry(int v, int c) { nVertices = v; nComponent = c; }
	virtual unsigned int getVerticesCount() { return nVertices; }
	virtual unsigned int getComponentCount() { return nComponent; }

	virtual const void* getAddress() = 0;
	virtual void init(std::initializer_list<Tvect> list) = 0;
	virtual void init(Tvect* l) = 0;
};

#endif /* GLVERTEXDATA_H_ */
